﻿@{
    ViewBag.Title = Model.CategoryID > 0 ? L("Ribbon_EditGroup") : L("Ribbon_CreateGroup");
}

@model PageGroup

@Html.HiddenFor(m=>m.CategoryID)
@if(Model.CategoryID <= 0){
    @Html.CultureDropdownListExFor(m=>m.CultureName)
}
@Html.TextBoxExFor(mbox=>mbox.CategoryName, new{
    data_val_required=L("PageGroup_CategoryNameNotNull"),
    data_val_remote=L("PageGroup_DuplicateCategoryName"),
    data_val_remote_url=Url.Action("CheckGroupName"),
    data_val_remote_additionalfields="*.CategoryName,*.CategoryID,*.CultureName"
})
@Html.TextBoxExFor(m => m.CategoryKey, new{
    data_val_regex_pattern=Consts.KeyRegex,
    data_val_regex=L("Key_FormatInvalid"), 
    data_val_remote=L("Key_Duplicate"),
    data_val_remote_url=Url.Action("CheckGroupKey"),
    data_val_remote_additionalfields="*.CategoryKey,*.CategoryID,*.CultureName"
}) 
 
<div class="lineinput">
    @Html.Label("", L("RoleLevel"))
    @Html.EnumDropdownListFor(m=>m.RoleLevel, (RoleLevel)(-1), Self.RoleLevel, new{@class="kendoui"})
    <p></p>
</div>
@Html.TextAreaExFor(mbox => mbox.Description) 
    
@Html.ButtonEx()

@section head{
    @Scripts.Render("~/scripts/jqueryval")
}